# -*- coding:utf-8 -*-
# @Author: shenyuyu
# @Time: 2023/6/15 10:27
# @File: 重写.py


class Animal:
    def __init__(self, name):
        print("我是动物")
        self.name = name


class Dog(Animal):
    def __init__(self, name, age):
        self.name = name
        self.age = age
        print("我是狗，今年3岁狗")
        super().__init__(name)



if __name__ == "__main__":
    d =Dog("tom", 12)
    print(d.name)